home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / Macintosh Tracker 1.20 / source / Tracker Client Folder / Core 18⁄March⁄1994 / CStaticText.c < prev    next >
Encoding:
Text File  |  1993-06-04  |  1.5 KB  |  45 lines  |  [TEXT/KAHL]

  1. ,
  2.             "CStaticText::IStaticText called on already initialized object."));
  3.         EXECUTE(Initialized = True);
  4.         Text = DaText;
  5.         ERROR(DaText==NIL,PRERR(ForceAbort,"CStaticText::IStaticText passed NIL for text."));
  6.         FontID = TheFontID;
  7.         PointSize = ThePointSize;
  8.         Justification = TheJustification;
  9.         IViewRect(Start,Extent,TheWindow,TheEnclosure);
  10.     }
  11.  
  12.  
  13. void        CStaticText::DoUpdate(void)
  14.     {
  15.         ERROR(Initialized != True,PRERR(ForceAbort,
  16.             "CStaticText::DoUpdate called on uninitialized object."));
  17.         SetUpPort();
  18.         Window->ResetPen();
  19.         Window->SetText(FontID,0,srcOr,PointSize,0);
  20.         if (!Enabled)
  21.             {
  22.                 Window->SetGreyishTextOr();
  23.             }
  24.         ERROR(Text==NIL,PRERR(ForceAbort,"CStaticText::DoUpdate Text handle is NIL."));
  25.         HLock(Text);
  26.         Window->LTextBox(ZeroPoint,Extent,Text,Justification);
  27.         HUnlock(Text);
  28.     }
  29.  
  30.  
  31. void        CStaticText::DoDisable(void)
  32.     {
  33.         inherited::DoDisable();
  34.         SetUpPort();
  35.         Window->InvalidateLong(ZeroPoint,Extent);
  36.     }
  37.  
  38.  
  39. void        CStaticText::DoEnable(void)
  40.     {
  41.         inherited::DoEnable();
  42.         SetUpPort();
  43.         Window->InvalidateLong(ZeroPoint,Extent);
  44.     }
  45.